package cate.game.attr;

import cate.game.play.support.PlayBuildContext;
import cate.game.role.bag.inscription.InscriptionPage;
import cate.game.role.bag.inscription.InscriptionPageOn;

public class InscriptionPowerAttrPart extends PowerAttrPart {
    public InscriptionPowerAttrPart() {
    }

    public InscriptionPowerAttrPart(PlayBuildContext ctx, InscriptionPageOn po) {
        if (po.getRole() == null) {
            return;
        }
        FightAttr attr = new FightAttr();
        this.powerExt = 0;
        InscriptionPage page = po.getRole().getRes().inscription.pageMap.get(po.page);
        if (page == null) {
            return;
        }
        if (page.uidMap != null && page.uidMap.size() > 0) {
            attr.add(page.getPowerAttr(ctx));
        }
        this.attr = attr;
        this.skills = page.getSkills(ctx);
    }

}
